<html>
<head><meta charset="utf-8"><title>Good First Issue · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html">Good First Issue</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="227095465"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227095465" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227095465">(Feb 20 2021 at 14:41)</a>:</h4>
<p>Hello everyone. I am new to rust analyzer project. I would like to work on issue <a href="https://github.com/rust-analyzer/rust-analyzer/issues/7454">https://github.com/rust-analyzer/rust-analyzer/issues/7454</a>. I wanted help to understand the requirement of this ticket.</p>



<a name="227095554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227095554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227095554">(Feb 20 2021 at 14:43)</a>:</h4>
<p>Is the requirement is to update documentation with the correct wording? I checked the functionality in VSCode and it shows "Expand Selection" and "Shrink Selection" as tasks.</p>



<a name="227095616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227095616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227095616">(Feb 20 2021 at 14:44)</a>:</h4>
<p>In documentation there is no "Shrink Selection", so I can add that also.</p>



<a name="227096175"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227096175" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227096175">(Feb 20 2021 at 14:56)</a>:</h4>
<p>Oof, sorry, that issue is a bit of a mess</p>



<a name="227096356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227096356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227096356">(Feb 20 2021 at 15:00)</a>:</h4>
<p>No problem. I will look into another issue.</p>



<a name="227096577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227096577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227096577">(Feb 20 2021 at 15:04)</a>:</h4>
<p>I've added a comment</p>



<a name="227096589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227096589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227096589">(Feb 20 2021 at 15:04)</a>:</h4>
<p>I think there's not much to do there except removing the feature description</p>



<a name="227098484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227098484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227098484">(Feb 20 2021 at 15:39)</a>:</h4>
<p>Currently when I build the plugin, it is giving me build error. The error in client.ts file. I resolved the error, should I create pull request?</p>



<a name="227098558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227098558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227098558">(Feb 20 2021 at 15:40)</a>:</h4>
<p>Pulled the latest code on master branch. Latest commit is 1349f6a79177c6b.</p>



<a name="227098597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227098597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227098597">(Feb 20 2021 at 15:41)</a>:</h4>
<p>I think the issue is due to changes in lc.LanguageClient object.</p>



<a name="227098900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227098900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227098900">(Feb 20 2021 at 15:46)</a>:</h4>
<p>Sorry about this. after recent pull needed to do npm install to get recent packages. Now its building properly.</p>



<a name="227295810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227295810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227295810">(Feb 22 2021 at 16:34)</a>:</h4>
<p>Hello everyone. I am new to this project. I was looking into the issues and can't find any bug labeled ticket. I would like to start with small issue. How can I find such small work? If anyone suggests some work directly, I would also like to work on that. Open to anything <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="227296154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227296154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227296154">(Feb 22 2021 at 16:36)</a>:</h4>
<p>There are some issues labelled as such -- <a href="https://github.com/rust-analyzer/rust-analyzer/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22">https://github.com/rust-analyzer/rust-analyzer/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22</a> -- but most of these don't seem particularly easy</p>



<a name="227296458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227296458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227296458">(Feb 22 2021 at 16:38)</a>:</h4>
<p>You can take <a href="https://github.com/rust-lang/rust/issues/7526">#7526</a> (though it might be too easy?) It's been partly done in <a href="https://github.com/rust-analyzer/rust-analyzer/pull/7707">https://github.com/rust-analyzer/rust-analyzer/pull/7707</a></p>



<a name="227297320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227297320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227297320">(Feb 22 2021 at 16:44)</a>:</h4>
<p>There's a PR open for it, but it's not exactly right</p>



<a name="227298172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227298172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227298172">(Feb 22 2021 at 16:50)</a>:</h4>
<p>I did look for good first issue, but found only 1 issue that was not actionable. Thank you <span class="user-mention" data-user-id="203546">@Laurențiu Nicola</span> for the issue suggestion. I will look into <a href="https://github.com/rust-lang/rust/issues/7526">#7526</a> issue.</p>



<a name="227298311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227298311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227298311">(Feb 22 2021 at 16:50)</a>:</h4>
<p>Maybe <a href="https://github.com/rust-analyzer/rust-analyzer/issues/3154">https://github.com/rust-analyzer/rust-analyzer/issues/3154</a> too</p>



<a name="227298404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227298404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227298404">(Feb 22 2021 at 16:51)</a>:</h4>
<p><a href="https://github.com/rust-analyzer/rust-analyzer/issues/7731">https://github.com/rust-analyzer/rust-analyzer/issues/7731</a> if you have a bit of experience with GitHub Actions</p>



<a name="227301636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227301636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227301636">(Feb 22 2021 at 17:09)</a>:</h4>
<p>Hi <span class="user-mention" data-user-id="203546">@Laurențiu Nicola</span>, issue <a href="https://github.com/rust-lang/rust/issues/7526">#7526</a> is already closed and pull/7707 PR is merged. looking into <a href="https://github.com/rust-lang/rust/issues/3154">#3154</a> issue.</p>



<a name="227301939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227301939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227301939">(Feb 22 2021 at 17:11)</a>:</h4>
<p><a href="https://github.com/rust-analyzer/rust-analyzer/issues/7526">https://github.com/rust-analyzer/rust-analyzer/issues/7526</a></p>



<a name="227301941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227301941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227301941">(Feb 22 2021 at 17:11)</a>:</h4>
<p>wrong repo <span aria-label="big smile" class="emoji emoji-1f604" role="img" title="big smile">:big_smile:</span> <a href="https://github.com/rust-analyzer/rust-analyzer/issues/7526">https://github.com/rust-analyzer/rust-analyzer/issues/7526</a></p>



<a name="227302081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227302081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227302081">(Feb 22 2021 at 17:12)</a>:</h4>
<p>linking issue #numbers directly seems to be a bad idea for this stream <span aria-label="big smile" class="emoji emoji-1f604" role="img" title="big smile">:big_smile:</span></p>



<a name="227302197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227302197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227302197">(Feb 22 2021 at 17:13)</a>:</h4>
<p><a href="https://github.com/rust-analyzer/rust-analyzer/issues/7526">rust-analyzer#7526</a> also works</p>



<a name="227302247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227302247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227302247">(Feb 22 2021 at 17:13)</a>:</h4>
<p>I wish Zulip had per-stream linkifier settings</p>



<a name="227302448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227302448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227302448">(Feb 22 2021 at 17:14)</a>:</h4>
<p>another rather simple issue with rough instructions is here <a href="https://github.com/rust-analyzer/rust-analyzer/issues/7693">https://github.com/rust-analyzer/rust-analyzer/issues/7693</a></p>



<a name="227311548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227311548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227311548">(Feb 22 2021 at 18:10)</a>:</h4>
<p>Hi all, while working on renaming crate assists to ide_assists. after renaming there are multiple warngings not related to renaming. (clippy warnings) what should I do?</p>



<a name="227312537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227312537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227312537">(Feb 22 2021 at 18:16)</a>:</h4>
<p>You can ignore clippy warnings, we don't generally have a policy of having zero clippy warnings (<a href="https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/dev/style.md#clippy">https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/dev/style.md#clippy</a>)</p>



<a name="227312638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227312638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227312638">(Feb 22 2021 at 18:17)</a>:</h4>
<p>ok</p>



<a name="227324900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227324900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227324900">(Feb 22 2021 at 19:39)</a>:</h4>
<p>I have done the changes for <a href="https://github.com/rust-lang/rust/issues/7526">#7526</a> and created pull request <a href="https://github.com/rust-analyzer/rust-analyzer/pull/7759">https://github.com/rust-analyzer/rust-analyzer/pull/7759</a>. Thank you guys for the help. This is my first contribution to this project. <span aria-label="big smile" class="emoji emoji-1f604" role="img" title="big smile">:big_smile:</span></p>



<a name="227396075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227396075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227396075">(Feb 23 2021 at 08:26)</a>:</h4>
<p>You could also give <a href="https://github.com/rust-analyzer/rust-analyzer/issues/7708">https://github.com/rust-analyzer/rust-analyzer/issues/7708</a> a try</p>



<a name="227460264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227460264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227460264">(Feb 23 2021 at 16:32)</a>:</h4>
<p>Hi <span class="user-mention" data-user-id="203546">@Laurențiu Nicola</span> , I will work on <a href="https://github.com/rust-lang/rust/issues/7708">#7708</a>.</p>



<a name="227461277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227461277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227461277">(Feb 23 2021 at 16:37)</a>:</h4>
<p>You mean <a href="https://github.com/rust-analyzer/rust-analyzer/issues/7708">rust-analyzer#7708</a> :D</p>



<a name="227461416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227461416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227461416">(Feb 23 2021 at 16:38)</a>:</h4>
<p>See <a href="https://github.com/rust-analyzer/rust-analyzer/tree/master/docs/dev#how-to-">https://github.com/rust-analyzer/rust-analyzer/tree/master/docs/dev#how-to-</a> and <a href="https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/dev/architecture.md">https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/dev/architecture.md</a></p>



<a name="227462039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227462039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227462039">(Feb 23 2021 at 16:42)</a>:</h4>
<p>Ohh I got it now. The #&lt;number&gt; tag directly links to rust project and not rust-analyzer. Thank you for the docs links.</p>



<a name="227462246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227462246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227462246">(Feb 23 2021 at 16:43)</a>:</h4>
<p>Yeah, I made the same mistake yesterday :-)</p>



<a name="227465523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227465523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227465523">(Feb 23 2021 at 17:02)</a>:</h4>
<p>my 1 observation is that <a href="https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/generated_assists.adoc">https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/generated_assists.adoc</a> this link is not working. same with generated_diagnostics.adoc in user manual page. Is this issue or am I missing something?</p>



<a name="227471304"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227471304" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227471304">(Feb 23 2021 at 17:38)</a>:</h4>
<p>That's <a href="https://rust-analyzer.github.io/manual.html#assists-code-actions">https://rust-analyzer.github.io/manual.html#assists-code-actions</a></p>



<a name="227471386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227471386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227471386">(Feb 23 2021 at 17:39)</a>:</h4>
<p>The link is indeed broken (the file is in <code>.gitignore</code>), but don't worry about it. Once you have your assist, it's easy to generate the docs if you've followed the same convention</p>



<a name="227623310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227623310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227623310">(Feb 24 2021 at 16:08)</a>:</h4>
<p>ok</p>



<a name="227636829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227636829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227636829">(Feb 24 2021 at 17:19)</a>:</h4>
<p>I am working on adding Assist. For that I am learning the existing assists code. What is the best way to learn and debug Assists? Currently I have added the debug point, but it debugger never hits that point.</p>



<a name="227636993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227636993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227636993">(Feb 24 2021 at 17:20)</a>:</h4>
<p>I guess the best way to learn how to write on is reading <a href="https://github.com/rust-analyzer/rust-analyzer/pull/7535">https://github.com/rust-analyzer/rust-analyzer/pull/7535</a></p>



<a name="227637170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227637170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227637170">(Feb 24 2021 at 17:21)</a>:</h4>
<p>About the debugger, you might need a (different) extension. I think CodeLLDB works for me on Linux, Microsoft's C++ extension works on Windows and none of them on Mac :-). But I'm not sure, I find debuggers pretty painful to use in Rust, at least to some other non-native languages</p>



<a name="227637328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227637328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227637328">(Feb 24 2021 at 17:22)</a>:</h4>
<p>You might be better off using <code>log::info!</code> or <code>log::error!</code> to print the values you're interested in. <a href="https://tedspence.com/the-art-of-printf-debugging-7d5274d6af44">https://tedspence.com/the-art-of-printf-debugging-7d5274d6af44</a> demonstrates that technique.</p>



<a name="227638025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227638025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227638025">(Feb 24 2021 at 17:26)</a>:</h4>
<p>Thank you <span class="user-mention" data-user-id="203546">@Laurențiu Nicola</span> for that suggestion. I am using CodeLLDB but I also find that painful for rust. I am reading remove_unused_params assists currently as it is small code. I will look into extract function assist also afterwards.</p>



<a name="227776930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227776930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227776930">(Feb 25 2021 at 14:40)</a>:</h4>
<p>Do we have to set log file path or any default path is taken for debug build.</p>



<a name="227783833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/227783833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#227783833">(Feb 25 2021 at 15:22)</a>:</h4>
<p>If you're using Code, they'll show up in the Output window. But you might need to set <code>RA_LOG=info</code> or something  like that</p>



<a name="228075529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228075529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228075529">(Feb 27 2021 at 18:46)</a>:</h4>
<p>Good morning guys. I am working on <a href="https://github.com/rust-analyzer/rust-analyzer/issues/7708">https://github.com/rust-analyzer/rust-analyzer/issues/7708</a> issue. I have created code for happy case scenario. Should I get that code reviewed first or implement all the checks and other cases code and then submit for reivew (via pull request)?</p>



<a name="228077767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228077767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228077767">(Feb 27 2021 at 19:24)</a>:</h4>
<p>You can file a draft PR. It may or may not be reviewed, depending on the availability of the reviewers :-)</p>



<a name="228078044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228078044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228078044">(Feb 27 2021 at 19:30)</a>:</h4>
<p>I did not consider the time and efforts required for reviewer. I will complete the work and then file PR. Thank you for the suggestion.</p>



<a name="228078332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228078332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228078332">(Feb 27 2021 at 19:36)</a>:</h4>
<p>It's all right either way, really, just no promises about reviewing it</p>



<a name="228082442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228082442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228082442">(Feb 27 2021 at 20:52)</a>:</h4>
<p>The codegen part generated wrong test case. Should I update that test case manually in generated file?</p>



<a name="228082762"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228082762" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228082762">(Feb 27 2021 at 20:59)</a>:</h4>
<p>I fixed the issue, there were many issues in documentation example code.</p>



<a name="228083568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228083568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228083568">(Feb 27 2021 at 21:14)</a>:</h4>
<p>I like the test suite created in this project. Checking every aspect of the code. <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="228084186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228084186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228084186">(Feb 27 2021 at 21:27)</a>:</h4>
<p>left you some comments</p>



<a name="228257037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228257037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228257037">(Mar 01 2021 at 16:11)</a>:</h4>
<p><span class="user-mention silent" data-user-id="300586">Lukas Wirth</span> <a href="#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Good.20First.20Issue/near/228084186">said</a>:</p>
<blockquote>
<p>left you some comments</p>
</blockquote>
<p>Thank you <span class="user-mention" data-user-id="300586">@Lukas Wirth</span> for the review and feedback. I will work on it.</p>



<a name="228290593"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228290593" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228290593">(Mar 01 2021 at 19:23)</a>:</h4>
<p>For Impl node in ast we don't have ast::NameOwner implemented for it. Any specific reason anyone know.</p>



<a name="228291789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228291789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228291789">(Mar 01 2021 at 19:30)</a>:</h4>
<p><code>Impl</code> has no name hence it doesn't implement it</p>



<a name="228295178"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228295178" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228295178">(Mar 01 2021 at 19:53)</a>:</h4>
<p>so impl Example {} we dont consider Example as name of impl block?</p>



<a name="228295388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228295388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228295388">(Mar 01 2021 at 19:54)</a>:</h4>
<p>No, <code>Example</code> is a <code>PathType</code> in that case</p>



<a name="228295454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228295454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228295454">(Mar 01 2021 at 19:55)</a>:</h4>
<p>I gave you another comment on the PR btw, I unfortunately directed you into the wrong direction before it seems <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="228296702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228296702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228296702">(Mar 01 2021 at 20:03)</a>:</h4>
<p>the target of an impl block is a type, which can be other things than a simple name. For example, there's an <code>impl&lt;T&gt; [T]</code></p>



<a name="228297381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228297381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228297381">(Mar 01 2021 at 20:08)</a>:</h4>
<p><span class="user-mention" data-user-id="300586">@Lukas Wirth</span>  committed the changes. 1 more thing is pending that if Default impl is already implemented then skip the assist. I will work on that later.</p>



<a name="228297701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228297701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228297701">(Mar 01 2021 at 20:10)</a>:</h4>
<p>Alright, for that you will probably have to use the <code>Semantics</code> type since you will have to query whether the type already implements Default(as searching for the <code>Default</code> impl in the AST won't cover everything).</p>



<a name="228297851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228297851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228297851">(Mar 01 2021 at 20:11)</a>:</h4>
<p>thanks for the pointer. I will look into Semantics. that one I kept pending cause I wasn't sure about the logic.</p>



<a name="228298518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228298518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228298518">(Mar 01 2021 at 20:15)</a>:</h4>
<p>for formatting this project are we using rustfmt or rust-analyzer formatter?</p>



<a name="228298658"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228298658" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228298658">(Mar 01 2021 at 20:16)</a>:</h4>
<p>rust-analyzer uses rustfmt under the hood</p>



<a name="228298828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228298828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228298828">(Mar 01 2021 at 20:17)</a>:</h4>
<p>so they both are exactly same or rust-analyzer add some extra logic?</p>



<a name="228299650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228299650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228299650">(Mar 01 2021 at 20:23)</a>:</h4>
<p>rust-analyzer has no formatter on its own, so its just rustfmt</p>



<a name="228299695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228299695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228299695">(Mar 01 2021 at 20:23)</a>:</h4>
<p>a future rust-analyzer will hopefully have its own formatter</p>



<a name="228301900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228301900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228301900">(Mar 01 2021 at 20:38)</a>:</h4>
<p><span class="user-mention silent" data-user-id="300586">Lukas Wirth</span> <a href="#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Good.20First.20Issue/near/228299695">said</a>:</p>
<blockquote>
<p>a future rust-analyzer will hopefully have its own formatter</p>
</blockquote>
<p>why hopefully?</p>



<a name="228302420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228302420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228302420">(Mar 01 2021 at 20:41)</a>:</h4>
<p>So we can format our syntax trees in memory for assists and such</p>



<a name="228302453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228302453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228302453">(Mar 01 2021 at 20:41)</a>:</h4>
<p>Didn't mean to imply rustfmt being bad or anything <span aria-label="big smile" class="emoji emoji-1f604" role="img" title="big smile">:big_smile:</span></p>



<a name="228302602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228302602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228302602">(Mar 01 2021 at 20:43)</a>:</h4>
<p>nah I'm just trying to understand :)</p>



<a name="228302639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228302639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228302639">(Mar 01 2021 at 20:43)</a>:</h4>
<p>do you specifically want your own formatter? Or just a formatting library, the way <code>chalk</code> works?</p>



<a name="228302663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228302663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228302663">(Mar 01 2021 at 20:43)</a>:</h4>
<p>I think it's plausible for rustfmt to use syn/quote instead of rustc eventually</p>



<a name="228302835"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228302835" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228302835">(Mar 01 2021 at 20:45)</a>:</h4>
<p>I don't think that will help here, see <a href="https://github.com/rust-analyzer/rust-analyzer/issues/1665">https://github.com/rust-analyzer/rust-analyzer/issues/1665</a> and <a href="https://github.com/rust-analyzer/rust-analyzer/issues/923">https://github.com/rust-analyzer/rust-analyzer/issues/923</a></p>



<a name="228302905"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228302905" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228302905">(Mar 01 2021 at 20:45)</a>:</h4>
<p>the goal is to be able to directly format our syntax trees so we can emit well formatted edits and such</p>



<a name="228302927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228302927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228302927">(Mar 01 2021 at 20:45)</a>:</h4>
<p>from what i remember</p>



<a name="228302954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228302954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228302954">(Mar 01 2021 at 20:45)</a>:</h4>
<p>oh man pattern-based formatting sounds amazing :D</p>



<a name="228302959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228302959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228302959">(Mar 01 2021 at 20:45)</a>:</h4>
<p>I've always wanted that in rust</p>



<a name="228303009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228303009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228303009">(Mar 01 2021 at 20:46)</a>:</h4>
<p>We try to build on stable, so a prerequisite for that would be rustfmt and rust-analyzer sharing the parser and maybe AST types</p>



<a name="228825473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228825473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228825473">(Mar 04 2021 at 18:30)</a>:</h4>
<p>Hi guys, I have updated the implementation for <a href="https://github.com/rust-analyzer/rust-analyzer/issues/7708">https://github.com/rust-analyzer/rust-analyzer/issues/7708</a> issue.<br>
and completed it. Please have a look at pull request <a href="https://github.com/rust-analyzer/rust-analyzer/pull/7800">https://github.com/rust-analyzer/rust-analyzer/pull/7800</a> when you have free time.</p>



<a name="228986603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228986603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228986603">(Mar 05 2021 at 16:56)</a>:</h4>
<p>Hi <span class="user-mention" data-user-id="300586">@Lukas Wirth</span> , I had tried your approach, but for me the deafault trait as well as std create comes None from FamousDefs.</p>



<a name="228986910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228986910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228986910">(Mar 05 2021 at 16:58)</a>:</h4>
<p>Oh right, that is because by default we do not test with std/core enabled, so they will always come out as <code>None</code>, there is a way to add them to your test fixtures though, give me a sec so I can find an example.</p>



<a name="228987629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228987629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228987629">(Mar 05 2021 at 17:02)</a>:</h4>
<p>Basically you want to wrap the <code>check_assist</code> function in your tests to inject the FamousDefs fixture for you.</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">    </span><span class="k">fn</span> <span class="nf">check</span><span class="p">(</span><span class="n">ra_fixture_before</span>: <span class="kp">&amp;</span><span class="kt">str</span><span class="p">,</span><span class="w"> </span><span class="n">ra_fixture_after</span>: <span class="kp">&amp;</span><span class="kt">str</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">before</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&amp;</span><span class="fm">format!</span><span class="p">(</span><span class="w"></span>
<span class="w">            </span><span class="s">"//- /main.rs crate:main deps:core{}{}"</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="n">before</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="n">FamousDefs</span>::<span class="n">FIXTURE</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="p">);</span><span class="w"></span>
<span class="w">        </span><span class="n">check_assist</span><span class="p">(</span><span class="n">generate_default_from_new</span><span class="p">,</span><span class="w"> </span><span class="n">before</span><span class="p">,</span><span class="w"> </span><span class="n">after</span><span class="p">);</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="228987698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228987698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228987698">(Mar 05 2021 at 17:02)</a>:</h4>
<p>With that you can call <code>check</code> instead of check-assist in your tests and it should work</p>



<a name="228987744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228987744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228987744">(Mar 05 2021 at 17:02)</a>:</h4>
<p>You can see this trick being used here as well <a href="https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/replace_for_loop_with_for_each.rs#L146-L154">https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/replace_for_loop_with_for_each.rs#L146-L154</a></p>



<a name="228989052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228989052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228989052">(Mar 05 2021 at 17:10)</a>:</h4>
<p>Thank you <span class="user-mention" data-user-id="300586">@Lukas Wirth</span> I will update the code and submit for review.</p>



<a name="228995017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/228995017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#228995017">(Mar 05 2021 at 17:48)</a>:</h4>
<p>Hi <span class="user-mention" data-user-id="300586">@Lukas Wirth</span>, with the fixture added in test code. all tests are failing. I will debug that and get back to you tomorrow.</p>



<a name="229115057"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229115057" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229115057">(Mar 06 2021 at 17:39)</a>:</h4>
<p>Hi all,<br>
I have written code to check if trait is implemented for not for struct as below. But even though trait is implemented then also it is giving me false.</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">fn</span> <span class="nf">is_default_implemented</span><span class="p">(</span><span class="n">ctx</span>: <span class="kp">&amp;</span><span class="nc">AssistContext</span><span class="p">,</span><span class="w"> </span><span class="n">impl_</span>: <span class="kp">&amp;</span><span class="nc">Impl</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Option</span><span class="o">&lt;</span><span class="kt">bool</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">db</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ctx</span><span class="p">.</span><span class="n">sema</span><span class="p">.</span><span class="n">db</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">impl_def</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ctx</span><span class="p">.</span><span class="n">sema</span><span class="p">.</span><span class="n">to_def</span><span class="p">(</span><span class="n">impl_</span><span class="p">)</span><span class="o">?</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">ty</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">impl_def</span><span class="p">.</span><span class="n">target_ty</span><span class="p">(</span><span class="n">db</span><span class="p">);</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">krate</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">impl_def</span><span class="p">.</span><span class="n">module</span><span class="p">(</span><span class="n">db</span><span class="p">).</span><span class="n">krate</span><span class="p">();</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">default_trait</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FamousDefs</span><span class="p">(</span><span class="o">&amp;</span><span class="n">ctx</span><span class="p">.</span><span class="n">sema</span><span class="p">,</span><span class="w"> </span><span class="nb">Some</span><span class="p">(</span><span class="n">krate</span><span class="p">)).</span><span class="n">core_default_Default</span><span class="p">()</span><span class="o">?</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">implements_default</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ty</span><span class="p">.</span><span class="n">impls_trait</span><span class="p">(</span><span class="n">db</span><span class="p">,</span><span class="w"> </span><span class="n">default_trait</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="p">[]);</span><span class="w"></span>
<span class="w">    </span><span class="nb">Some</span><span class="p">(</span><span class="n">implements_default</span><span class="p">)</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>I have checked that default_trait value has data. But impls_trait method giving false after going in salsa code.</p>



<a name="229116488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229116488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229116488">(Mar 06 2021 at 18:01)</a>:</h4>
<p>The above code failing for below test</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">struct</span> <span class="nc">Example</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">_inner</span>: <span class="p">()</span><span class="w"> </span><span class="p">}</span><span class="w"></span>

<span class="k">impl</span><span class="w"> </span><span class="n">Exmaple</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">n</span><span class="cp">$</span><span class="mi">0</span><span class="n">ew</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="nc">Self</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="bp">Self</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">_inner</span>: <span class="p">()</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">impl</span><span class="w"> </span><span class="nb">Default</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Example</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">default</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="nc">Self</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="bp">Self</span>::<span class="n">new</span><span class="p">()</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>but succeeding for below code</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">mod</span> <span class="nn">test</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">struct</span> <span class="nc">Example</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">_inner</span>: <span class="p">()</span><span class="w"> </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="k">impl</span><span class="w"> </span><span class="n">Example</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">n</span><span class="cp">$</span><span class="mi">0</span><span class="n">ew</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="nc">Self</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="bp">Self</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">_inner</span>: <span class="p">()</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="k">impl</span><span class="w"> </span><span class="nb">Default</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Example</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="k">fn</span> <span class="nf">default</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="nc">Self</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="bp">Self</span>::<span class="n">new</span><span class="p">()</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="229118014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229118014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229118014">(Mar 06 2021 at 18:22)</a>:</h4>
<p>You seem to have typoed <code>Example</code> in the first snippet(you did as well in the test) so I imagine thats the problem<br>
you wrote <code>impl Exmaple {</code> instead of <code>impl Example {</code></p>



<a name="229118054"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229118054" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229118054">(Mar 06 2021 at 18:23)</a>:</h4>
<p>If the problem still persists though I'll check your PR out locally and see whats wrong later</p>



<a name="229118923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229118923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229118923">(Mar 06 2021 at 18:35)</a>:</h4>
<p>That was the issue. Silly mistake. Thank you <span class="user-mention" data-user-id="300586">@Lukas Wirth</span></p>



<a name="229122543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229122543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229122543">(Mar 06 2021 at 19:30)</a>:</h4>
<p>Hi <span class="user-mention" data-user-id="300586">@Lukas Wirth</span>, I have committed the updated code.</p>



<a name="229124615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229124615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229124615">(Mar 06 2021 at 20:01)</a>:</h4>
<p>Hi <span class="user-mention" data-user-id="300586">@Lukas Wirth</span>, I have updated the code with your review comments.</p>



<a name="229124811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229124811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229124811">(Mar 06 2021 at 20:04)</a>:</h4>
<p>Thank you very much <span class="user-mention" data-user-id="300586">@Lukas Wirth</span>  for all the help and hand holding for my 1st task. <span aria-label="smiley" class="emoji emoji-1f603" role="img" title="smiley">:smiley:</span></p>



<a name="229124928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229124928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229124928">(Mar 06 2021 at 20:06)</a>:</h4>
<p>I will be starting work on <a href="https://github.com/rust-analyzer/rust-analyzer/issues/7709">https://github.com/rust-analyzer/rust-analyzer/issues/7709</a>, which is simillar task. Hopefully I will require less help <span aria-label="grinning face with smiling eyes" class="emoji emoji-1f601" role="img" title="grinning face with smiling eyes">:grinning_face_with_smiling_eyes:</span></p>



<a name="229125155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229125155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229125155">(Mar 06 2021 at 20:09)</a>:</h4>
<p>1 doubt about <a href="https://github.com/rust-analyzer/rust-analyzer/issues/7709">https://github.com/rust-analyzer/rust-analyzer/issues/7709</a>.<br>
the generated code for is_empty function is like </p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">is_empty</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="kt">bool</span> <span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="bp">self</span><span class="p">.</span><span class="n">data</span><span class="p">.</span><span class="n">len</span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>instead of this can we generate</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">is_empty</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="kt">bool</span> <span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="bp">self</span>::<span class="n">len</span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>as the implementation in len() function can be complex.</p>



<a name="229125258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229125258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229125258">(Mar 06 2021 at 20:10)</a>:</h4>
<p>I think that's an oversight in the issue, that should definitely generate <code>self.len() == 0</code>,</p>



<a name="229125310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229125310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229125310">(Mar 06 2021 at 20:11)</a>:</h4>
<p>I fixed the issue code snippets</p>



<a name="229125446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229125446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229125446">(Mar 06 2021 at 20:13)</a>:</h4>
<p>You probably want to check out this <a href="https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/replace_for_loop_with_for_each.rs#L74-L102">https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/replace_for_loop_with_for_each.rs#L74-L102</a><br>
since you want to check if the type already has an <code>is_empty</code> method or not, you can do that similar to there</p>



<a name="229125514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229125514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229125514">(Mar 06 2021 at 20:14)</a>:</h4>
<p>ok</p>



<a name="229125987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229125987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229125987">(Mar 06 2021 at 20:21)</a>:</h4>
<p>while working on other issue. should I continue with master branch (synced with upstream). or use different branch for different issue?</p>



<a name="229126172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229126172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229126172">(Mar 06 2021 at 20:24)</a>:</h4>
<p>Usually you'd want to make a branch per PR</p>



<a name="229126211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229126211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229126211">(Mar 06 2021 at 20:24)</a>:</h4>
<p>ok</p>



<a name="229901913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229901913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229901913">(Mar 11 2021 at 18:33)</a>:</h4>
<p>cargo xtask code giving error that unexpected argument: "codegen".<br>
Is anything changed. The xtask help message also does not show codegen.</p>



<a name="229902154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229902154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229902154">(Mar 11 2021 at 18:34)</a>:</h4>
<p><a href="#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/PSA.3A.20.60cargo.20xtask.20codegen.60.20is.20no.20more/near/229353544">https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/PSA.3A.20.60cargo.20xtask.20codegen.60.20is.20no.20more/near/229353544</a></p>



<a name="229902186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229902186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229902186">(Mar 11 2021 at 18:34)</a>:</h4>
<p>You don't need <code>cargo xtask codegen</code> any more</p>



<a name="229902818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229902818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229902818">(Mar 11 2021 at 18:38)</a>:</h4>
<p>my cargo test is failing. I already have 1 generated file. Should I delete that and then run cargo test?</p>



<a name="229905811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229905811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229905811">(Mar 11 2021 at 18:57)</a>:</h4>
<p>Fixed it.</p>



<a name="229907023"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/229907023" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#229907023">(Mar 11 2021 at 19:04)</a>:</h4>
<p>I have completed the work on <a href="https://github.com/rust-analyzer/rust-analyzer/issues/7709">https://github.com/rust-analyzer/rust-analyzer/issues/7709</a>. and created PR <a href="https://github.com/rust-analyzer/rust-analyzer/pull/7977">https://github.com/rust-analyzer/rust-analyzer/pull/7977</a></p>



<a name="230386157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230386157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230386157">(Mar 15 2021 at 17:23)</a>:</h4>
<p>Hi all. I have worked on adding is_empty from len assist. Please have a look at PR <a href="https://github.com/rust-analyzer/rust-analyzer/pull/8037">https://github.com/rust-analyzer/rust-analyzer/pull/8037</a>.</p>
<p>Hi <span class="user-mention" data-user-id="300586">@Lukas Wirth</span> , sorry that the old PR is closed. this happened mistakenly while cleaning remote branches I deleted my own branch. I have created new PR.</p>



<a name="230387602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230387602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230387602">(Mar 15 2021 at 17:32)</a>:</h4>
<p>No worries <span aria-label="big smile" class="emoji emoji-1f604" role="img" title="big smile">:big_smile:</span></p>



<a name="230396597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230396597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230396597">(Mar 15 2021 at 18:32)</a>:</h4>
<p>Hi <span class="user-mention" data-user-id="300586">@Lukas Wirth</span> , thank you for the review. Should I pick up the work of adding return type check for  generate is_empty assits?</p>



<a name="230396651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230396651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230396651">(Mar 15 2021 at 18:33)</a>:</h4>
<p>Feel free to, it shouldn't be that much work actually as I've noticed</p>



<a name="230396755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230396755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230396755">(Mar 15 2021 at 18:34)</a>:</h4>
<p>Basically you can just add</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">is_unsigned_integer</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kt">bool</span> <span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="fm">matches!</span><span class="p">(</span><span class="bp">self</span><span class="p">.</span><span class="n">ty</span><span class="p">.</span><span class="n">value</span><span class="p">.</span><span class="n">interned</span><span class="p">(</span><span class="o">&amp;</span><span class="n">Interner</span><span class="p">),</span><span class="w"> </span><span class="n">TyKind</span>::<span class="n">Scalar</span><span class="p">(</span><span class="n">Scalar</span>::<span class="n">Uint</span><span class="p">(</span><span class="n">_</span><span class="p">)))</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>to <code>hir::Type</code> to check if a type is an unsigned int, the rest should be simple enough as well I think</p>



<a name="230396871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230396871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230396871">(Mar 15 2021 at 18:34)</a>:</h4>
<p>Great. I will work on it. Thanks for the code.</p>



<a name="230401098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230401098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230401098">(Mar 15 2021 at 19:05)</a>:</h4>
<p>Hi <span class="user-mention" data-user-id="300586">@Lukas Wirth</span> , I have few doubts.<br>
In cargo clippy documentation they use only usize. Should we restrict type check to usize?<br>
the unsigned int is more useful, but then should we expand that to include signed ints also?</p>



<a name="230401301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230401301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230401301">(Mar 15 2021 at 19:07)</a>:</h4>
<p>other places in rust like ExactSizeIterator, the len function generally have usize return type.</p>



<a name="230401930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230401930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230401930">(Mar 15 2021 at 19:12)</a>:</h4>
<p>Just usize seems fine as well, I figured it might make sense to allow all unsigned ints.</p>



<a name="230402129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230402129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230402129">(Mar 15 2021 at 19:14)</a>:</h4>
<p>unsigned int will certainly give more freedom to apply it.</p>



<a name="230402448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230402448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230402448">(Mar 15 2021 at 19:16)</a>:</h4>
<p>I wanted to say that we sometimes use <code>u32</code> lengths or offsets to save memory, but those are either a struct (like <code>TextSize</code>) or <code>usize</code>. Even if you do that, there's not much reason to return anything else than <code>usize</code> from <code>len()</code>. So it's fine to only trigger it on <code>usize</code>.</p>



<a name="230402514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230402514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230402514">(Mar 15 2021 at 19:17)</a>:</h4>
<p>Right storing and returning are different matters I suppose, then only usize seems better</p>



<a name="230402807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230402807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230402807">(Mar 15 2021 at 19:19)</a>:</h4>
<p>And we can change it if someone files an issue :-)</p>



<a name="230406851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230406851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230406851">(Mar 15 2021 at 19:49)</a>:</h4>
<p>I have created PR <a href="https://github.com/rust-analyzer/rust-analyzer/pull/8040">https://github.com/rust-analyzer/rust-analyzer/pull/8040</a><br>
<span class="user-mention" data-user-id="300586">@Lukas Wirth</span>  please have a look at it when you get time.</p>



<a name="230723996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230723996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230723996">(Mar 17 2021 at 16:36)</a>:</h4>
<p>Hi everyone. I have gone through all good first issue and I can't find the task that either other people are not working on or either not easy to low medium difficulty level. Please suggest me the issue to work on.</p>



<a name="230724730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230724730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230724730">(Mar 17 2021 at 16:40)</a>:</h4>
<p>I will also take any maintainance work.</p>



<a name="230725303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230725303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230725303">(Mar 17 2021 at 16:43)</a>:</h4>
<p>is anyone working on this issue: <a href="https://github.com/rust-analyzer/rust-analyzer/issues/4613">https://github.com/rust-analyzer/rust-analyzer/issues/4613</a>?</p>



<a name="230726209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230726209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230726209">(Mar 17 2021 at 16:48)</a>:</h4>
<p>Nope, that should be free to work on.</p>



<a name="230726522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230726522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230726522">(Mar 17 2021 at 16:50)</a>:</h4>
<p>relevant highlighting happens here, <a href="https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/syntax_highlighting/highlight.rs">https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/syntax_highlighting/highlight.rs</a></p>



<a name="230726977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230726977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230726977">(Mar 17 2021 at 16:53)</a>:</h4>
<p>Looks like we now emit <code>function .attribute</code> for the attribute and <code>attribute .attribute</code> for the arguments</p>



<a name="230727501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230727501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230727501">(Mar 17 2021 at 16:56)</a>:</h4>
<p>Right, I'm not sure if thats too relevant now anymore actually</p>



<a name="230727580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230727580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230727580">(Mar 17 2021 at 16:57)</a>:</h4>
<p>You can try tackling this though I think <a href="https://github.com/rust-analyzer/rust-analyzer/issues/8024">https://github.com/rust-analyzer/rust-analyzer/issues/8024</a></p>



<a name="230727592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230727592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230727592">(Mar 17 2021 at 16:57)</a>:</h4>
<p>also semantic highlighting related</p>



<a name="230728177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/230728177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#230728177">(Mar 17 2021 at 17:00)</a>:</h4>
<p>sure, I will look into issue 8024</p>



<a name="231155257"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/231155257" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#231155257">(Mar 20 2021 at 16:14)</a>:</h4>
<p>About <a href="https://github.com/rust-analyzer/rust-analyzer/issues/8024">https://github.com/rust-analyzer/rust-analyzer/issues/8024</a>. To clarify requirements, where the trait is implemented, assign trait modifier to functions and variables that is used in trait.<br>
For this I will need to add new modifier trait right?</p>



<a name="231155889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/231155889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#231155889">(Mar 20 2021 at 16:27)</a>:</h4>
<p>Yes we want a new modifier for this</p>



<a name="231155963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/231155963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#231155963">(Mar 20 2021 at 16:29)</a>:</h4>
<p>The modifier should be applied to the <code>Name</code>/<code>NameRef</code>s of associated trait items</p>



<a name="231155970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/231155970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#231155970">(Mar 20 2021 at 16:29)</a>:</h4>
<p>as shown in the example in the issue</p>



<a name="231155971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/231155971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#231155971">(Mar 20 2021 at 16:29)</a>:</h4>
<p>So this works similar to the <code>Associated</code> modifier we already have</p>



<a name="231155976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/231155976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#231155976">(Mar 20 2021 at 16:29)</a>:</h4>
<p>just that it only applies to trait impls/defs</p>



<a name="231157158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/231157158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#231157158">(Mar 20 2021 at 16:51)</a>:</h4>
<p>ok</p>



<a name="232198865"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232198865" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ayomide Bamidele <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232198865">(Mar 28 2021 at 22:50)</a>:</h4>
<p>Hi! I was just looking at some first issues, and this channel. I love rust-analyzer and have been looking at ways to contribute :) I'm not sure if there has been any movement on <a href="https://github.com/rust-analyzer/rust-analyzer/issues/8024">https://github.com/rust-analyzer/rust-analyzer/issues/8024</a> mentioned in the above messages. But I had a look as an exercise of reading the code and want to check my understanding to learn. So to implement this feature, after looking at what I think are the relevant areas you'd need to:</p>
<ul>
<li>add a new custom lsp modifier in <code>rust-analyzer/semantic_token.rs</code> called "trait"</li>
<li>
<p>add a new <code>HlMod</code> called <code>Trait</code><br>
then do either or both:</p>
</li>
<li>
<p>modify the <code>traverse</code> function in <code>ide/syntax_highlighting.rs</code> to check if needed and apply the HlMod to the <code>highlight</code> constructred</p>
</li>
<li>
<p>modify the <code>highlight_name_ref_by_syntax</code> and <code>highlight_method_call</code> function in <code>ide/syntax_highlighting/highlight.rs</code>to apply this new <code>HlMod::Trait</code> to syntax nodes that are from traits<br>
my questions are:</p>
</li>
<li>
<p>how do you know if a thing is part of a trait? My guess is like <code>func.as_assoc_item(db).unwrap().containing_trait().is_some()</code> (unwrap for brevity)<br>
  is this correct or is there a better way to do this?</p>
</li>
<li>
<p>Are any of the above close to instructions for an implementation or am I very far off? <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span>  This is my first time really looking at a big open source project seriously so it would help to know if I'm completely wrong haha</p>
</li>
</ul>



<a name="232200423"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232200423" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232200423">(Mar 28 2021 at 23:19)</a>:</h4>
<p>Yep that's pretty much what it takes, this is basically just a special case for <code>HlMod::Associated</code> + highlighting the trait def. So the main difference is checking where the assoc item lives in.</p>



<a name="232200781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232200781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232200781">(Mar 28 2021 at 23:25)</a>:</h4>
<p>If you  want I can go look for some good first issues for you</p>



<a name="232202208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232202208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ayomide Bamidele <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232202208">(Mar 28 2021 at 23:52)</a>:</h4>
<p><span class="user-mention silent" data-user-id="300586">Lukas Wirth</span> <a href="#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Good.20First.20Issue/near/232200781">said</a>:</p>
<blockquote>
<p>If you  want I can go look for some good first issues for you</p>
</blockquote>
<p>Sure! I was having a look but wasn't sure what to choose. Thanks for confirming that I was on the right track!</p>



<a name="232202353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232202353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232202353">(Mar 28 2021 at 23:55)</a>:</h4>
<p>A simple one should be <a href="https://github.com/rust-analyzer/rust-analyzer/issues/8114">https://github.com/rust-analyzer/rust-analyzer/issues/8114</a> I think</p>



<a name="232202367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232202367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232202367">(Mar 28 2021 at 23:55)</a>:</h4>
<p>relevant file for that is <a href="https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/folding_ranges.rs">https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/folding_ranges.rs</a></p>



<a name="232202416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232202416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232202416">(Mar 28 2021 at 23:56)</a>:</h4>
<p>The logic should be very similar to how <code>use</code> statement groups are handled I believe</p>



<a name="232202441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232202441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232202441">(Mar 28 2021 at 23:57)</a>:</h4>
<p>or to comment groups as well</p>



<a name="232243381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232243381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ayomide Bamidele <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232243381">(Mar 29 2021 at 09:55)</a>:</h4>
<p>Looks interesting! I'll have a go at it</p>



<a name="232254764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232254764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ayomide Bamidele <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232254764">(Mar 29 2021 at 11:47)</a>:</h4>
<p>I've made a draft PR (<a href="https://github.com/rust-analyzer/rust-analyzer/pull/8231">https://github.com/rust-analyzer/rust-analyzer/pull/8231</a>) here that has tests, but I'm running into an issue with actually trying it out for myself. I tried to use the <code>Run Installed Extension</code>launch config, but I get an error <code>[matklad.rust-analyzer]: 'configuration.property' must be an object</code> that I'm not sure how to go about fixing</p>



<a name="232254845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232254845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232254845">(Mar 29 2021 at 11:48)</a>:</h4>
<p>You can safely ignore that one.</p>



<a name="232255433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232255433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ayomide Bamidele <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232255433">(Mar 29 2021 at 11:53)</a>:</h4>
<p>Oh, then I also get a bootstrap error that stops the extension from activating, the error isn't very descriptive so not sure what to do about it EDIT: Nevermind! Got it working with the <code>Run Debug</code> instead. PR should be done now, that was fun!</p>



<a name="232298686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232298686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232298686">(Mar 29 2021 at 16:49)</a>:</h4>
<p>I have 1 question. Do rust analyzer index all used crates and its dependencies on startup?</p>



<a name="232300660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232300660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232300660">(Mar 29 2021 at 17:02)</a>:</h4>
<p>Yes</p>



<a name="232300899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232300899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232300899">(Mar 29 2021 at 17:03)</a>:</h4>
<p>why do we index dependencies of used crates also? Can we directly use dependencies in our code without adding them to cargo.toml?</p>



<a name="232303029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232303029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232303029">(Mar 29 2021 at 17:17)</a>:</h4>
<p>Based on the basic search, I think we can't use dependencies of creates unless they are explicitly added in <code>cargo.toml</code>. So we should be able to ignore the dependencies of used creates. This will speed up the startup time. but more importantly will have benefit of reduced memory usage.<br>
Is this possible?</p>



<a name="232317892"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232317892" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232317892">(Mar 29 2021 at 18:57)</a>:</h4>
<p>We can't ignore dependencies of used crates, as those crates need the dependencies to be analyzed.</p>



<a name="232318211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232318211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232318211">(Mar 29 2021 at 19:00)</a>:</h4>
<p>yes, there are two main reasons we can't just ignore transitive dependencies: 1. we need to macroexpand the direct dependencies, which means resolving macros from transitive dependencies, which means macroexpanding them in turn, ...; 2. direct dependencies might reexport things from transitive dependencies</p>



<a name="232318400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232318400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232318400">(Mar 29 2021 at 19:01)</a>:</h4>
<p>why we do macro expand? to do highlight or more than that?</p>



<a name="232318450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232318450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232318450">(Mar 29 2021 at 19:01)</a>:</h4>
<p>Macros can expand to types and functions.</p>



<a name="232318992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232318992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ayomide Bamidele <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232318992">(Mar 29 2021 at 19:05)</a>:</h4>
<p><del>One question, in reference to this issue <a href="https://github.com/rust-analyzer/rust-analyzer/issues/6539#issuecomment-809577794">https://github.com/rust-analyzer/rust-analyzer/issues/6539#issuecomment-809577794</a>, how do you build a private version of the manual so that you can preview changes to docs? I can see a preview in vscode but it doesn't have the website's css and all that stuff</del> found it, was right on the page haha</p>



<a name="232319143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232319143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232319143">(Mar 29 2021 at 19:06)</a>:</h4>
<p>Ok. got the idea now. so for dependencies of crates we are limiting processing for macro expansion and re-exported things.</p>



<a name="232319906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232319906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232319906">(Mar 29 2021 at 19:12)</a>:</h4>
<p>I'm not sure we do that</p>



<a name="232493239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232493239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232493239">(Mar 30 2021 at 20:33)</a>:</h4>
<p>Hi <span class="user-mention" data-user-id="300586">@Lukas Wirth</span> , can you please help me fix the macos-latest build failing?<br>
The reason is test_format_document_unchanged is failing, but on my machine all tests are passing.</p>



<a name="232493506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232493506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232493506">(Mar 30 2021 at 20:34)</a>:</h4>
<p>Whenever I get the permission to merge request myself, the macos-latest build fails <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="232493684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232493684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232493684">(Mar 30 2021 at 20:35)</a>:</h4>
<p>That seems to be just unlucky, it happens sometimes and shouldnt be caused by your changes</p>



<a name="232493714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232493714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232493714">(Mar 30 2021 at 20:36)</a>:</h4>
<p>Im unsure why it even fails sometimes in the first place though</p>



<a name="232493944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232493944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232493944">(Mar 30 2021 at 20:37)</a>:</h4>
<p>I am also curious about it, cause PR does not contain any platform dependent code. If it passes on 2 OS build then...</p>



<a name="232494707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232494707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232494707">(Mar 30 2021 at 20:43)</a>:</h4>
<p>Well bors merged it so there you have it <span aria-label="big smile" class="emoji emoji-1f604" role="img" title="big smile">:big_smile:</span></p>



<a name="232494930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232494930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232494930">(Mar 30 2021 at 20:45)</a>:</h4>
<p>The spurious mac-os error is quite weird though as it errors on a non-empty directory, but the function that errors is <code>fs::remove_dir_all</code> which to my knowledge is supposed to clear the directory prior to deleting it?</p>



<a name="232495847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232495847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232495847">(Mar 30 2021 at 20:50)</a>:</h4>
<p><span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>



<a name="232496005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232496005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232496005">(Mar 30 2021 at 20:51)</a>:</h4>
<p><code>fs::remove_dir_all</code> will fail when a new file is created after it removed all containing files, but before removing the dir itself I think.</p>



<a name="232496395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232496395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232496395">(Mar 30 2021 at 20:54)</a>:</h4>
<p>In PR I committed 1 new file, that I removed later as not needed. Can that cause the issue?</p>



<a name="232496622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232496622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232496622">(Mar 30 2021 at 20:56)</a>:</h4>
<p>No, your PR is not relevant for this issue, I have seen it in a few PRs already, sometimes on normal CI sometimes when bors was trying to merge</p>



<a name="232496696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232496696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232496696">(Mar 30 2021 at 20:56)</a>:</h4>
<p>What bjorn3 said seems the most likely to me, I wonder if thats why on windows we call the function serveral times <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>



<a name="232496876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232496876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232496876">(Mar 30 2021 at 20:57)</a>:</h4>
<p>It seems weird though, judging from drop order <code>TestDir</code> gets dropped in the offending test last so this shouldn't be happening</p>



<a name="232496965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232496965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232496965">(Mar 30 2021 at 20:58)</a>:</h4>
<p>&lt;<a href="https://github.com/rust-analyzer/rust-analyzer/runs/2231268344#step:9:2846">https://github.com/rust-analyzer/rust-analyzer/runs/2231268344#step:9:2846</a>&gt; the backtrace as reference</p>



<a name="232933521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232933521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232933521">(Apr 02 2021 at 18:16)</a>:</h4>
<p>Can I take this issue: <a href="https://github.com/rust-analyzer/rust-analyzer/issues/8279">https://github.com/rust-analyzer/rust-analyzer/issues/8279</a>?</p>



<a name="232939085"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232939085" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232939085">(Apr 02 2021 at 19:07)</a>:</h4>
<p>How should I categorize 54 operators?<br>
<a href="https://doc.rust-lang.org/book/appendix-02-operators.html">https://doc.rust-lang.org/book/appendix-02-operators.html</a></p>



<a name="232939326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232939326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232939326">(Apr 02 2021 at 19:09)</a>:</h4>
<p>I like those kinds of tables to be categorized by precedence and then by function</p>



<a name="232939457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232939457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232939457">(Apr 02 2021 at 19:10)</a>:</h4>
<p>they currently appear to be ascii sorted</p>



<a name="232939691"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232939691" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232939691">(Apr 02 2021 at 19:13)</a>:</h4>
<p>Please look into issue <a href="https://github.com/rust-analyzer/rust-analyzer/issues/8279">https://github.com/rust-analyzer/rust-analyzer/issues/8279</a></p>



<a name="232939845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232939845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232939845">(Apr 02 2021 at 19:14)</a>:</h4>
<p>I need to provide different syntax highlighting to different operators. as there are many operators we need to come up with some categories</p>



<a name="232939886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232939886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232939886">(Apr 02 2021 at 19:14)</a>:</h4>
<p>I don't think user wants 54 different tokens for operators.</p>



<a name="232940031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232940031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232940031">(Apr 02 2021 at 19:16)</a>:</h4>
<p>One reasonably useful categorization is to separate out the binary operators from other things like <code>,</code> for tuples, <code>:</code> for struct literals, <code>@</code> in patterns</p>



<a name="232940244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232940244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232940244">(Apr 02 2021 at 19:18)</a>:</h4>
<p>another would be assignments, logical operators, bitwise operators, arithmetic ops, ranges</p>



<a name="232940347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232940347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232940347">(Apr 02 2021 at 19:19)</a>:</h4>
<p>and there are a few that probably deserve their own class: <code>&amp;</code> for reference, <code>.</code> for field/method projection, <code>?</code> for try, <code>!</code> for macros</p>



<a name="232940636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/232940636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#232940636">(Apr 02 2021 at 19:21)</a>:</h4>
<p>it's also potentially useful to separate <code>*</code> in <code>*const</code>, <code>+</code> in <code>trait + trait</code>, and <code>-&gt;</code> in function types in a class separate from the normal binary op <code>+</code>  and <code>*</code> for pointers</p>



<a name="233009945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233009945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233009945">(Apr 03 2021 at 14:26)</a>:</h4>
<p>Should we have same tag for assign shorthand as original operator?<br>
Ex. + and += will have same tag as Arithmetic. | and |= have same tag as bitwise</p>



<a name="233010986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233010986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233010986">(Apr 03 2021 at 14:47)</a>:</h4>
<p>I'd say for the time being trat them the same yes, it might make sense to give them modifiers for assign shorthand but I wouldn't worry about that for now.</p>



<a name="233011147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233011147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233011147">(Apr 03 2021 at 14:50)</a>:</h4>
<p>ok</p>



<a name="233213990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233213990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233213990">(Apr 05 2021 at 18:58)</a>:</h4>
<p>I am implementing the semantic highlighting for operators.<br>
For ! operator we have two cases !&lt;bool&gt; this will be logical operator and !&lt;u32&gt; this will be bitwise operator. How can I get what type of variable is in PrefixExpr?</p>



<a name="233214304"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233214304" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233214304">(Apr 05 2021 at 19:00)</a>:</h4>
<p>Semantics has a function to get the type of an expression, so you can do something along the lines of <code>sema.type_of_expr(prefix_expr.expr())</code></p>



<a name="233214580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233214580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233214580">(Apr 05 2021 at 19:02)</a>:</h4>
<p>But rust doesn't really discern between logical not and bitwise not on a language level, so I'm not sure if it makes sense to try to differentiate them here? Especially given with user implementations, if I have some struct <code>Foo</code> and implement not on it, is that a logical or bitwise not then, you can't really know.</p>



<a name="233214649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233214649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233214649">(Apr 05 2021 at 19:02)</a>:</h4>
<p>And the docs also call <code>std::ops::Not</code> a logical not, so I would say it should always be marked as a logical not</p>
<blockquote>
<p>The unary logical negation operator !.</p>
</blockquote>



<a name="233214868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233214868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233214868">(Apr 05 2021 at 19:04)</a>:</h4>
<p>that makes it easy. Thank you :)</p>



<a name="233697314"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233697314" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233697314">(Apr 08 2021 at 17:44)</a>:</h4>
<p>Created PR: <a href="https://github.com/rust-analyzer/rust-analyzer/pull/8354">https://github.com/rust-analyzer/rust-analyzer/pull/8354</a></p>



<a name="233697354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233697354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233697354">(Apr 08 2021 at 17:44)</a>:</h4>
<p>Can I take this issue?</p>



<a name="233697364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233697364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233697364">(Apr 08 2021 at 17:44)</a>:</h4>
<p><a href="https://github.com/rust-analyzer/rust-analyzer/issues/8425">https://github.com/rust-analyzer/rust-analyzer/issues/8425</a></p>



<a name="233697540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233697540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233697540">(Apr 08 2021 at 17:45)</a>:</h4>
<p>For that one you'd need to enable <code>onEnter</code> as described in the manual and check if it works for <code>//!</code> comments as well</p>



<a name="233697568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233697568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233697568">(Apr 08 2021 at 17:45)</a>:</h4>
<p>If it works, I'm inclined to close it</p>



<a name="233697951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233697951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233697951">(Apr 08 2021 at 17:47)</a>:</h4>
<p>checking it.</p>



<a name="233699227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233699227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233699227">(Apr 08 2021 at 17:54)</a>:</h4>
<p>surprisingly the the onEnter customization works for /// and //! but not for //. And in documentation the case for // is shown.</p>



<a name="233699491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233699491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233699491">(Apr 08 2021 at 17:55)</a>:</h4>
<p>I think that's intended, you need to end the previous line with a space (?) for it to work</p>



<a name="233699654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233699654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233699654">(Apr 08 2021 at 17:56)</a>:</h4>
<blockquote>
<p><code>Enter</code> in the middle or after a trailing space in <code>//</code> inserts <code>//</code></p>
</blockquote>



<a name="233700643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233700643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233700643">(Apr 08 2021 at 18:01)</a>:</h4>
<p>The enter in the middle is useful but space (?) is somewhat ugly to use. cause you need to press enter after (? this moves closing parenthesis to new line ). If you move to end of (?) the it does not add // in new line.</p>



<a name="233700679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233700679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233700679">(Apr 08 2021 at 18:01)</a>:</h4>
<p>Anyway all documented cases are working. Good to close the ticket.</p>



<a name="233700843"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233700843" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233700843">(Apr 08 2021 at 18:02)</a>:</h4>
<p>Sorry, it's not literally <code> (?)</code>, it's just a trailing space -- you can almost see it in the GIF.</p>



<a name="233700880"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233700880" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233700880">(Apr 08 2021 at 18:02)</a>:</h4>
<p>I wrote "(?)" because I wasn't sure about it</p>



<a name="233701042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233701042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233701042">(Apr 08 2021 at 18:03)</a>:</h4>
<p>why don't we add this feature in plugin itself. Many people including myself would not know this exists. This is very good feature to have.<br>
Edit: grammar</p>



<a name="233701093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233701093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233701093">(Apr 08 2021 at 18:03)</a>:</h4>
<p>ohh I got that, it makes sense now. :)</p>



<a name="233701194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233701194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233701194">(Apr 08 2021 at 18:04)</a>:</h4>
<p>See <a href="https://github.com/rust-analyzer/rust-analyzer/pull/6037">https://github.com/rust-analyzer/rust-analyzer/pull/6037</a></p>



<a name="233701231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233701231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233701231">(Apr 08 2021 at 18:04)</a>:</h4>
<p>Basically, it was enabled by default and a lot of people complained that it slowed their typing</p>



<a name="233701324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233701324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233701324">(Apr 08 2021 at 18:05)</a>:</h4>
<p>And if RA crashes or hangs, you can't press enter any more (Shift-Enter works IIRC, but most users probably don't know that)</p>



<a name="233701552"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233701552" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233701552">(Apr 08 2021 at 18:06)</a>:</h4>
<p>It's slow because the keypresses need to go through the extension host instead of being handled directly by the editor. And the extension host can be busy doing anything else (we might not be the only extension running).</p>



<a name="233701717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233701717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233701717">(Apr 08 2021 at 18:07)</a>:</h4>
<p>Maybe you want to take the rest of <a href="https://github.com/rust-analyzer/rust-analyzer/issues/8024#issuecomment-813236524">https://github.com/rust-analyzer/rust-analyzer/issues/8024#issuecomment-813236524</a>?</p>



<a name="233702251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233702251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233702251">(Apr 08 2021 at 18:10)</a>:</h4>
<p><span class="user-mention silent" data-user-id="203546">Laurențiu</span> <a href="#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Good.20First.20Issue/near/233701324">said</a>:</p>
<blockquote>
<p>And if RA crashes or hangs, you can't press enter any more (Shift-Enter works IIRC, but most users probably don't know that)</p>
</blockquote>
<p>Hmm. It looks like this feature can be added in VSCode extension in typescript. Which would solve many (all?) the problems.</p>



<a name="233702359"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233702359" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233702359">(Apr 08 2021 at 18:11)</a>:</h4>
<p><span class="user-mention silent" data-user-id="203546">Laurențiu</span> <a href="#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Good.20First.20Issue/near/233701717">said</a>:</p>
<blockquote>
<p>Maybe you want to take the rest of <a href="https://github.com/rust-analyzer/rust-analyzer/issues/8024#issuecomment-813236524">https://github.com/rust-analyzer/rust-analyzer/issues/8024#issuecomment-813236524</a>?</p>
</blockquote>
<p>Great, I will pickup this work.</p>



<a name="233702394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233702394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233702394">(Apr 08 2021 at 18:11)</a>:</h4>
<p>It can be added in <code>package.json</code>, but matklad is against that because it's more or less a hack (if you're in a raw string or a macro you might not want the comment continuation, but you can't check for that with a regex)</p>



<a name="233705492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233705492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Mcnab <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233705492">(Apr 08 2021 at 18:31)</a>:</h4>
<p>Is it possible to detect the semantic highlighting token the cursor is in?</p>



<a name="233705654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233705654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233705654">(Apr 08 2021 at 18:32)</a>:</h4>
<p>Programatically or for testing? Code has a command to show them.</p>



<a name="233705821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233705821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Mcnab <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233705821">(Apr 08 2021 at 18:33)</a>:</h4>
<p>Yeah, in the vscode client api. Because in theory, we could have a good guess regex, then check the token type if the regex match occurs.</p>



<a name="233705965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233705965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233705965">(Apr 08 2021 at 18:34)</a>:</h4>
<p>Maybe, but you still need to run extension code for that</p>



<a name="233706372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233706372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233706372">(Apr 08 2021 at 18:36)</a>:</h4>
<p>In the documentation for on enter, should we add //! also?</p>



<a name="233706373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233706373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Mcnab <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233706373">(Apr 08 2021 at 18:36)</a>:</h4>
<p>My point is thought that <span class="user-mention" data-user-id="133169">@matklad</span> said:</p>
<blockquote>
<p>I guess, in practice, maybe we want to cave in and use the simple regex handler here?</p>
</blockquote>
<p>in <a href="https://github.com/rust-analyzer/rust-analyzer/pull/6037#issuecomment-698976840">https://github.com/rust-analyzer/rust-analyzer/pull/6037#issuecomment-698976840</a><br>
Which suggests that using the regex handler would in some way be better<br>
So my suggestion is to weed out the false positives from the 'regex handler', whatever that actually means</p>



<a name="233706509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233706509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233706509">(Apr 08 2021 at 18:37)</a>:</h4>
<p>The regex handler is the one configured in <code>package.json</code> and is run automatically by Code (outside of the extension host)</p>



<a name="233706590"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233706590" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233706590">(Apr 08 2021 at 18:37)</a>:</h4>
<p>So it's fast, but less elegant and might have some false positives</p>



<a name="233706696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233706696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Mcnab <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233706696">(Apr 08 2021 at 18:38)</a>:</h4>
<p>Ah, so it handles the enhanced enter itself? We should ask upstream to allow enabling it on based on semantic token types instead then?</p>



<a name="233706774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233706774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233706774">(Apr 08 2021 at 18:38)</a>:</h4>
<p>That might be one way to do it, AIUI</p>



<a name="233706919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233706919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233706919">(Apr 08 2021 at 18:39)</a>:</h4>
<p>To be honest, it wouldn't be too bad, even without taking into account semantic tokens or anything. Even if it has some false positives in a macro, it's still better than not having it at all (or randomly slowing down typing).</p>



<a name="233707957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233707957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Mcnab <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233707957">(Apr 08 2021 at 18:46)</a>:</h4>
<p><span class="user-mention silent" data-user-id="203546">Laurențiu</span> <a href="#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Good.20First.20Issue/near/233706509">said</a>:</p>
<blockquote>
<p>The regex handler is the one configured in <code>package.json</code> and is run automatically by Code (outside of the extension host)</p>
</blockquote>
<p>Can you link the documentation of this please?</p>



<a name="233708447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233708447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Mcnab <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233708447">(Apr 08 2021 at 18:49)</a>:</h4>
<p>Right, I've found this <a href="https://github.com/microsoft/vscode/blob/94c9ea46838a9a619aeafb7e8afd1170c967bb55/src/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.ts#L701">https://github.com/microsoft/vscode/blob/94c9ea46838a9a619aeafb7e8afd1170c967bb55/src/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.ts#L701</a></p>



<a name="233710692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233710692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233710692">(Apr 08 2021 at 19:04)</a>:</h4>
<p>Created PR for updating on enter documentation with added test case <a href="https://github.com/rust-analyzer/rust-analyzer/pull/8429">https://github.com/rust-analyzer/rust-analyzer/pull/8429</a></p>



<a name="233716039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/233716039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#233716039">(Apr 08 2021 at 19:41)</a>:</h4>
<p>Created PR for highlighting trait associated type with modifier. <a href="https://github.com/rust-analyzer/rust-analyzer/pull/8431">https://github.com/rust-analyzer/rust-analyzer/pull/8431</a></p>



<a name="237682777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/237682777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#237682777">(May 06 2021 at 15:53)</a>:</h4>
<p>Good morning everyone...<br>
Can I take this issue: <a href="https://github.com/rust-analyzer/rust-analyzer/issues/8734">https://github.com/rust-analyzer/rust-analyzer/issues/8734</a></p>



<a name="237683694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/237683694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#237683694">(May 06 2021 at 15:59)</a>:</h4>
<p>All yours</p>



<a name="237684253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/237684253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#237684253">(May 06 2021 at 16:01)</a>:</h4>
<p>Great :). I was sick so took break from project.</p>



<a name="237957724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/237957724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#237957724">(May 08 2021 at 13:54)</a>:</h4>
<p>Has anyone faced error: internal compiler error: unexpected panic recently with rustc 1.52.0?</p>



<a name="237957968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/237957968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#237957968">(May 08 2021 at 13:58)</a>:</h4>
<p><a href="/user_uploads/4715/Pe7oc-LUGixG5c2OepkmLIZF/compiler_error.txt">compiler_error.txt</a></p>



<a name="237958674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/237958674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#237958674">(May 08 2021 at 14:08)</a>:</h4>
<p>causing compiler panic with simple change<br>
<a href="/user_uploads/4715/cTugyVA4_QAnaFwJxAPdorlT/change.diff">change.diff</a></p>



<a name="237958866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/237958866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#237958866">(May 08 2021 at 14:10)</a>:</h4>
<p>that's a known issue ye <a href="https://github.com/rust-lang/rust/issues/85003">https://github.com/rust-lang/rust/issues/85003</a></p>



<a name="237976861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/237976861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#237976861">(May 08 2021 at 18:53)</a>:</h4>
<p>This is out of curiosity, regarding SmolStr implementation.<br>
The new_inline function is written as</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="cp">#[inline]</span><span class="w"></span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="k">fn</span> <span class="nf">new_inline</span><span class="p">(</span><span class="n">text</span>: <span class="kp">&amp;</span><span class="kt">str</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">SmolStr</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">buf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">INLINE_CAP</span><span class="p">];</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"></span>
<span class="w">        </span><span class="k">while</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">text</span><span class="p">.</span><span class="n">len</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="n">buf</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">text</span><span class="p">.</span><span class="n">as_bytes</span><span class="p">()[</span><span class="n">i</span><span class="p">];</span><span class="w"></span>
<span class="w">            </span><span class="n">i</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="mi">1</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">        </span><span class="n">SmolStr</span><span class="p">(</span><span class="n">Repr</span>::<span class="n">Inline</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="n">len</span>: <span class="nc">text</span><span class="p">.</span><span class="n">len</span><span class="p">()</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="kt">u8</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="n">buf</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="p">})</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>here why the text.as_bytes() function is in the while loop and not outside the loop. Does making it inline optimizes this point.<br>
As the as_bytes() on str converts complete str to bytes in 1 go.</p>



<a name="237977070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/237977070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#237977070">(May 08 2021 at 18:57)</a>:</h4>
<p><code>as_bytes()</code> doesn't do much, so I'm guessing it would make no difference: <a href="https://doc.rust-lang.org/src/core/str/mod.rs.html#224">https://doc.rust-lang.org/src/core/str/mod.rs.html#224</a></p>



<a name="237977080"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/237977080" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#237977080">(May 08 2021 at 18:57)</a>:</h4>
<p>But yeah, that could maybe look cleaner</p>



<a name="237977769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/237977769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#237977769">(May 08 2021 at 19:08)</a>:</h4>
<p>mem::transmute is single memcpy under the hood. So I think it does not matter for single string (regarding of its length.) But I think for large number of strings calling memcpy 1 time or n times (max 22) will make difference.</p>



<a name="237977799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/237977799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#237977799">(May 08 2021 at 19:09)</a>:</h4>
<p>it is useful to add PR for this?</p>



<a name="238016483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/238016483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Mcnab <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#238016483">(May 09 2021 at 07:28)</a>:</h4>
<p>I'd expect it to be trivially optimised out - you could check the assembly to see though</p>



<a name="238017763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/238017763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#238017763">(May 09 2021 at 07:54)</a>:</h4>
<p>That transmute only transmutes a reference (16 bytes), not the whole string</p>



<a name="238030857"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/238030857" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#238030857">(May 09 2021 at 11:54)</a>:</h4>
<p>str.as_bytes() converts the whole string. And we are using this method.</p>



<a name="238031793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/238031793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#238031793">(May 09 2021 at 12:10)</a>:</h4>
<p>there's no conversion necessary, it's just casting a pointer</p>



<a name="238031826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/238031826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#238031826">(May 09 2021 at 12:11)</a>:</h4>
<p>ohh, that makes it clear.</p>



<a name="238039916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/238039916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#238039916">(May 09 2021 at 14:36)</a>:</h4>
<p>Hi, I am working on issue: <a href="https://github.com/rust-analyzer/rust-analyzer/issues/8734">https://github.com/rust-analyzer/rust-analyzer/issues/8734</a><br>
Currently the <code>CrateDisplayName</code> provides the name. It has crate_name and canonical_name as fields.<br>
So do I put custom lib name in crate_name or canonical_name?</p>



<a name="238916345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/238916345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#238916345">(May 15 2021 at 18:24)</a>:</h4>
<p>Hi all. Unfortunately my laptop has stopped working. It was old so no regrets there. but I won't be able to get new one for atleast 3-4 months due to covid 19 and other conditions. So please some one take the issue 8734 as I won't be able to contribute.</p>



<a name="238916391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/238916391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#238916391">(May 15 2021 at 18:25)</a>:</h4>
<p>For compiling RA with lto enabled, is 16gb ram enough or it will require 32gb ram?</p>



<a name="238916464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/238916464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#238916464">(May 15 2021 at 18:26)</a>:</h4>
<p>any other suggestion for new laptop??</p>



<a name="238916592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/238916592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#238916592">(May 15 2021 at 18:28)</a>:</h4>
<p>16 GB should be enough. I tried to test now, but the RAM usage seemed pretty low for some reason</p>



<a name="238916616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/238916616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#238916616">(May 15 2021 at 18:29)</a>:</h4>
<p>Thank you</p>



<a name="238916718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/238916718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#238916718">(May 15 2021 at 18:30)</a>:</h4>
<p>Tuxedo Pulse 15 was a nice laptop last time I looked, but I don't know if they've refreshed it or added a new line with newer CPUs. Also sold as TongFang or Mechrevo, see a review at <a href="https://www.notion.so/Mechrevo-Code-01-TongFang-PF5NU1G-Information-8009025fdefc40118ab0ea973e7e0988">https://www.notion.so/Mechrevo-Code-01-TongFang-PF5NU1G-Information-8009025fdefc40118ab0ea973e7e0988</a></p>



<a name="238916830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/238916830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#238916830">(May 15 2021 at 18:32)</a>:</h4>
<p>I'll try tomorrow to measure the peak RSS more accurately (with cgroups, maybe?)</p>



<a name="238917046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/238917046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#238917046">(May 15 2021 at 18:34)</a>:</h4>
<p>I will check if this is available in my country (India). Due to recent conditions all delivery and shipments are stopped.</p>



<a name="238917077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/238917077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#238917077">(May 15 2021 at 18:35)</a>:</h4>
<p>Yeah, I imagine availability will be the main criteria.</p>



<a name="238917172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/238917172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#238917172">(May 15 2021 at 18:37)</a>:</h4>
<p>Stay safe, by the way. I hope things get better soon there.</p>



<a name="238917715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Good%20First%20Issue/near/238917715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chetan Khilosiya <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Good.20First.20Issue.html#238917715">(May 15 2021 at 18:47)</a>:</h4>
<p>I hope so</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>